import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.use(VueAxios, axios)
Vue.use(ElementUI);
Vue.config.productionTip = false


axios.interceptors.request.use(config=>{
  console.log(config);
  let token = localStorage.getItem("token") || '{}';
  console.log("tokennnnnnnnnnnnnnnnnnnn:",token);
  //let userInfo = JSON.parse(token);
  config.headers['token'] = token;
  return config;
},err=>{
  return Promise.reject(err);
})




new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
